import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

export default new VueRouter({
    mode: "hash",
    routes: [{
            path: "/xinche",
            name: "xinche",
            component: () => import("../views/XinChe.vue"),
            children: [{
                    path: "/xinche/xinnengyuan",
                    name: "xinnengyuan",
                    component: () => import("../views/xinche/XinNengYuan.vue"),
                    children: [{
                            path: "/xinche/xinnengyuan/remen",
                            name: "remen",
                            component: () => import("../views/xinche/xinnengyuan/ReMen.vue"),
                        },
                        {
                            path: "/xinche/xinnengyuan/pinpai",
                            name: "pinpai",
                            component: () => import("../views/xinche/xinnengyuan/PinPai.vue"),
                        },
                        {
                            path: "/xinche/xinnengyuan/tiaojian",
                            name: "tiaojian",
                            component: () => import("../views/xinche/xinnengyuan/TiaoJian.vue"),
                        },
                        {
                            path: '/xinche/xinnengyuan',
                            redirect: '/xinche/xinnengyuan/remen'
                        }
                    ]
                },
                {
                    path: "/xinche/xinche",
                    name: "xinche",
                    component: () => import("../views/xinche/XinChe.vue"),
                },
                {
                    path: "/xinche/haohuapinpai",
                    name: "haohuapinpai",
                    component: () => import("../views/xinche/HaoHuaPinPai.vue"),
                    children: [
                        {
                            path: "/xinche/haohuapinpai/xiaoliang",
                            name: "xiaoliang",
                            component: () => import("../views/xinche/haohuapinpai/XiaoLiang.vue"),
                        },
                        {
                            path: "/xinche/haohuapinpai/jiangjia",
                            name: "jiangjia",
                            component: () => import("../views/xinche/haohuapinpai/JiangJia.vue"),
                        },
                        {
                            path: '/xinche/haohuapinpai',
                            redirect: '/xinche/haohuapinpai/xiaoliang'
                        }
                    ]
                },
                {
                    path: '/xinche',
                    redirect: '/xinche/xinnengyuan'
                }
            ]
        },
        {
            path: "/xinnengyuan",
            name: "xinnengyuan",
            component: () => import("../views/XinNengYuan.vue"),
        },
        {
            path: "/faxian",
            name: "faxian",
            component: () => import("../views/FaXian.vue"),
        },
        {
            path: "/ershouche",
            name: "ershouche",
            component: () => import("../views/ErShouChe.vue"),
        },
        {
            path: "/wode",
            name: "wode",
            component: () => import("../views/WoDe.vue"),
        },
        {
            path: '/',
            redirect: '/xinche'
        }
    ]
})